package org.example.myleet.p1374;

public class Solution {
    public String generateTheString(int n) {
        int n1 = n, n2 = 0;
        if ((n & 1) == 0) {
            n1 = n - 1;
            n2 = 1;
        }
        StringBuilder res = new StringBuilder();
        for (int i = 0; i < n1; ++i) {
            res.append('a');
        }
        for (int i = 0; i < n2; ++i) {
            res.append('b');
        }
        return res.toString();
    }
}
